import {
	defineConfig
} from "vite"
import uni from "@dcloudio/vite-plugin-uni";

//代理后端接口地址
// var baseUrl = "http://183.196.38.62:23000";
// var baseUrl = "http://127.0.0.1:8014";http://localhost:2824/System/Index#
 var baseUrl = "http://localhost:2824";
// var baseUrl = "http://192.168.1.232:8011";


export default defineConfig({
	plugins: [
		uni()
	],
	server: {
		//配置反向代理
		proxy: {
			'/api': {
				target: baseUrl,
				changeOrigin: true,
				rewrite: path => {
					return path.replace(/^\/api/, '')
				}
			},
		}
	}
})